#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
    char arr[20] = { 0 };
    int i = 0;
    int Ca = 0;
    int Cb = 0;
    for (i = 0; i < 20; i++)
    {
        scanf("%c", &arr[i]);
        if (arr[i] == 0)
        {
            break;
        }
        else if (arr[i] == 'A')
        {
            Ca++;
        }
        else if (arr[i] == 'B')
        {
            Cb++;
        }
    }
    if (Ca > Cb)
    {
        printf("A");
    }
    else if (Cb > Ca)
    {
        printf("B");
    }
    else {
        printf("E");
    }
    return 0;
}